Ext.BLANK_IMAGE_URL = '../ext/resources/images/default/s.gif';
Ext.ux.RecycleList = Ext.extend(Ext.Panel, {
	border:false,
	layout : 'border',
	title:'可回收数据列表',
	closable : 'true',
	initComponent : function() {
		var addPanel = function(btn, event) {
			var n = tabPanel.getComponent(btn.text);
			if (n) {
				tabPanel.setActiveTab(n);
				return;
			}
			n = tabPanel.add(eval(btn.id));
			tabPanel.setActiveTab(n);
			tabPanel.doLayout();
		}
	
		var tabPanel = new Ext.TabPanel( {
			region : 'center',
			enableTabScroll : true,
			frame : true,
			activeTab : 0,
			autoTabs:true,
			deferredRender:false,
			layoutOnTabChange : true,
			items : [{
				title : 'Welcome!',
				html:'<img src="recycle/re.jpg" width=100% height=100% />'
			}]
		});
	
		var treePanel = new Ext.Panel({
	    	title: 'Item Panel',
	        region:'west',
	        split: true,
	        frame : true,
	        width:200,
	        minSize: 150,
	        maxSize:250,
	        collapsible : true,
			collapseMode: 'mini',
	        autoScroll: true,
	        layout:'vbox',
	        defaults:{
				xtype:'button'
	        },
	        items:[{
		        width:'100%',
		        text:'产品列表',
		        id:'new Ext.ux.VisibleProductList({id:"产品列表"})',
		        tooltip:'Product Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    },{
		        width:'100%',
		        text:'设备列表',
		        id:'new Ext.ux.VisibleEquipmentList({id:"设备列表"})',
		        tooltip:'Equipment Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'新闻列表',
		       id:'new Ext.ux.VisibleNewsList({id:"新闻列表"})',
		        tooltip:'News Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'反馈信息列表',
		        id:'new Ext.ux.VisibleFeedbackList({id:"反馈信息列表"})',
		        tooltip:'Feedback Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'类别信息列表',
		        id:'new Ext.ux.VisibleCategoryList({id:"类别信息列表"})',
		        tooltip:'Category Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'管理员列表',
		        id:'new Ext.ux.VisibleAdminList({id:"管理员列表"})',
		        tooltip:'Admin Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'友情链接列表',
		        id:'new Ext.ux.VisibleLinkList({id:"友情链接列表"})',
		        tooltip:'Link Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }, {
		        width:'100%',
		        text:'在线客服列表',
		        id:'new Ext.ux.VisibleOnlineList({id:"在线客服列表"})',
		        tooltip:'Online Unvisible List',
				tooltipType:'qtip',
				listeners : {click : addPanel}
		    }]
	    });
	
		this.items = [treePanel, tabPanel];
		Ext.ux.RecycleList.superclass.initComponent.call(this);
	}
});
Ext.reg('lgnRecycleList', Ext.ux.RecycleList);